<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<script type="text/javascript">
    $(function() {
	    $.extend($.fn.validatebox.defaults.rules, {
	    	minLength: {
			validator: function(value, param){
					return value.length >= param[0];
				},
				messbirthday: '请输入至少{0}个字符.'
		    }
		});
	var associationId=parent.getAssociationId();
		$("#cuurAssociationId").val(associationId);
        $('#leaguerEditForm').form({
            url : '${path }/admin/leaguer/save',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为leaguer.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    var form = $('#leaguerEditForm');
                    parent.$.messager.alert('提示', eval(result.msg), 'warning');
                }
            }
        });
    });
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false" title="" style="padding: 3px;">
        <form id="leaguerEditForm" method="post">
        	<input name="associationId" id="cuurAssociationId" type="hidden"  value="${leaguer.associationId}">
            <!-- <div class="light-info" style="overflow: hidden;padding: 3px;">
                <div>密码不修改请留空。</div>
            </div> -->
            <table class="grid">
                <tr>
                    <td>登录名</td>
                    <td><input name="id" type="hidden"  value="${leaguer.id}">
                    <input name="nikeName" type="text" placeholder="请输入登录名称" class="easyui-validatebox" data-options="required:true,validType:'minLength[3]'" value="${leaguer.nikeName}"></td>
                    <td>姓名</td>
                    <td><input name="trueName" type="text" placeholder="请输入姓名" class="easyui-validatebox" data-options="required:true" value="${leaguer.trueName}"></td>
                </tr>
                <tr>
                    <td>密码</td>
                    <td><input type="text" name="password" value="${leaguer.password}" class="easyui-validatebox" data-options="required:true,validType:'minLength[6]'" /></td>
                    <td>性别</td>
                    <td><select id="leaguerEditSex" name="sex" class="easyui-combobox" data-options="width:140,height:29,editable:false,panelHeight:'auto'">
                            <option value="1" <c:choose> <c:when test="${leaguer.sex== '1'}"> selected="selected" </c:when></c:choose>>男</option>
                            <option value="0" <c:choose> <c:when test="${leaguer.sex== '0'}"> selected="selected" </c:when></c:choose>>女</option>
                    </select></td>
                </tr>
                <tr>
                    <td>出生年月</td>
                    <td><input type="text" name="birthday" class="easyui-validatebox" data-options="required:true" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd'})" value="${leaguer.birthday}"/></td>
                    <td>社团职务</td>
                    <td><input type="text" name="position" value="${leaguer.position}" class="easyui-validatebox"/></td>
                </tr>
                 <tr>
                    <td>QQ</td>
                    <td><input name="qq" type="text"  class="easyui-validatebox"  value="${leaguer.qq}"></td>
                    <td>邮箱</td>
                    <td><input name="email" type="text" placeholder="请输入邮箱" class="easyui-validatebox" data-options="required:true,validType:'email'" value="${leaguer.email}"></td>
                </tr>
                <tr>
                    <td>缴纳会费</td>
                    <td><input  id="leaguerEditdues" name="dues" class="easyui-numberbox"/></td>
                    <td>缴费时间</td>
                    <td><input type="text" name="payTime" class="easyui-validatebox"  data-options="required:true" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" value="${leaguer.payTime}"/></td>
                </tr>
                <tr>
                    <td>联系电话</td>
                    <td>
                        <input type="text" name="telephone" class="easyui-numberbox" value="${leaguer.telephone}"/>
                    </td>
                    <td>会员状态</td>
                    <td><select id="leaguerEditStatus" name="status" class="easyui-combobox" data-options="width:140,editable:false,panelHeight:'auto'">
                            <option value="1" <c:choose> <c:when test="${leaguer.status== '1'}"> selected="selected" </c:when></c:choose>>正常</option>
                            <option value="0" <c:choose> <c:when test="${leaguer.status== '0'}"> selected="selected" </c:when></c:choose>>停用</option>
                    </select></td>
                </tr>
                <tr>
                    <td>班级</td>
                    <td>
                        <input type="text" name="className" class="easyui-numberbox" value="${leaguer.className}"/>
                    </td>
                    <td>入团时间</td>
                    <td><input type="text" name="joinDate" class="easyui-validatebox" data-options="required:true" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd'})" value="${leaguer.joinDate}"/></td>
                </tr>
                <tr>
                	<td>备注</td>
                    <td colspan="3">
                        <textarea rows="3" cols="3" style="width: 100%;" name="remarks">${leaguer.remarks}</textarea>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>